-- GENERATED SPELL FOR [Anub'ar Cultist] --


function spell0_26319(pUnit, Event) --@Empower,n/a--
pUnit:FullCastSpellOnTarget(47257,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26319', 10277, 1)
end

function spell1_26319(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(9613,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26319', 3000, 1)
end

function spell2_26319(pUnit, Event) --@Zeal,Self--
pUnit:FullCastSpellOnTarget(51605,pUnit)
pUnit:RegisterEvent('Sorts_26319', 558, 1)
end

function Sorts_26319(pUnit, Event)
local choix_sorts_26319 = math.random(0, 2)
if choix_sorts_26319 == 0 then
pUnit:RegisterEvent('spell0_26319', 1, 1)
end
if choix_sorts_26319 == 1 then
pUnit:RegisterEvent('spell1_26319', 1, 1)
end
if choix_sorts_26319 == 2 then
pUnit:RegisterEvent('spell2_26319', 1, 1)
end
end

function mob26319_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_26319', math.random(1500, 3000), 1)
end

function mob26319_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob26319_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob26319_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(26319, 1, 'mob26319_Action')
RegisterUnitEvent(26319, 2, 'mob26319_Leave')
RegisterUnitEvent(26319, 3, 'mob26319_Kill')
RegisterUnitEvent(26319, 4, 'mob26319_Die')
